export function getYearMonthArray(num) {
  const date = new Date();
  const year = date.getFullYear().toString().slice(-2); // 获取年份的后两位
  const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 获取当前月份，并确保是两位数

  // 创建一个数组来存储结果
  let result = [];

  // 添加当前年月
  result.push(year + month);

  // 计算并添加接下来的两个月
  for (let i = 1; i <= (num - 1); i++) {
    let nextMonth = parseInt(month, 10) + i;
    let nextYear = year;

    if (nextMonth > 12) {
      nextMonth -= 12;
      nextYear = (parseInt(year, 10) + 1).toString().padStart(2, '0');
    }

    result.push(nextYear + nextMonth.toString().padStart(2, '0'));
  }

  return result;
}
